package com.cy.pj.sys.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysStuProDao {
    /**
     * 根据stu_id删除
     */
    @Delete("delete from sys_student_product where stu_id=#{id}")
    Integer deleteById(Long id);

    /**
     * 根据stu_id查对应的类型id
     * @param id
     * @return
     */
    @Select("select pro_id from sys_student_product where stu_id=#{id}")
    List<Integer> selectProId(Long id);

    /**
     * 在中间表添加对应的类型
     * @return
     */
    Integer insertStudentProduct(Long StuId,List<String> types);
}
